package cn.bdqn.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.security.core.GrantedAuthority;

/**
 * @ProjectName: ycbdqn
 * @Package: cn.bdqn.entity
 * @Author: huat
 * @Date: 2020/3/5 14:16
 * @Version: 1.0
 */
public class SysRole implements GrantedAuthority {
    private int rid;
    private String roleName;
    private String roleNameCn;

    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleNameCn() {
        return roleNameCn;
    }

    public void setRoleNameCn(String roleNameCn) {
        this.roleNameCn = roleNameCn;
    }

    @JsonIgnore//忽略此属性  转成json字符串时不进行转换
    @Override
    public String getAuthority() {
        return roleName;
    }
}
